home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / mebbs / lastu421.lha / HangUp.REXX next >
OS/2 REXX Batch file  |  1994-08-11  |  1KB  |  52 lines

  1. /* HangUp.REXX Test Code                                          */
  2.  
  3. signal on ERROR
  4. parse arg LineNumber
  5.  
  6. DoorName = "LastUser"
  7.  
  8. if( ~show( 'l', "mebbsarexx.library" ) )then do
  9.    say "Opening mebbsarexx.library"
  10.     if( ~addlib( "mebbsarexx.library", 0, -30, 0 ) )then do
  11.       say "Could not open library"
  12.       exit 10
  13.    end
  14. end
  15.  
  16. call Message DoorName,LineNumber,"OK , a Quick hang up for you ",1
  17. call Message DoorName,LineNumber," ",1
  18. call Message DoorName,LineNumber,"Hanging up now!!",1
  19. call HangUp DoorName,LineNumber
  20.  
  21. path="DOORS:"
  22. a=0
  23.  
  24. logoff=left(time(), 5, 3)
  25.  
  26. call open(file,path||'LastUser/LastUser.txt','R')
  27.      do until eof(file)
  28.     a=a+1
  29.     lin.a = readln(file)
  30.      end
  31. call close(file)
  32.  
  33. if LineNumber ~= "0" then do
  34.      call open(file,path||'LastUser/LastUser.txt','W')
  35.      call writeln(file,lin.1''logoff' l')
  36.      call writeln(file,lin.2)
  37.      call writeln(file,lin.3)
  38.      call writeln(file,lin.4)
  39.      call writeln(file,lin.5)
  40.      call writeln(file,lin.6)
  41.      call writeln(file,lin.7)
  42.      call writeln(file,lin.8)
  43.      call writeln(file,lin.9)
  44.      call close(file)
  45. end
  46. exit 0
  47.  
  48. ERROR:
  49. call HangUp DoorName,LineNumber
  50. call REMLIB("mebbsarexx.library")
  51. exit 10
  52.